package com.itsu.job.components;

import com.itsu.job.config.Job;

/**
 * @author Jerry.Su
 * @Date 2021/11/22 14:54
 */
public class ScheduleRunnable<T extends ScheduleHandler, R extends Job> implements Runnable{

    private final T handler;

    private final R job;

    public ScheduleRunnable(T handler, R job) {
        this.handler = handler;
        this.job = job;
    }

    @Override
    public void run() {
        handler.handle(job);
    }

}
